package com.cy.detectsys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;

import lombok.Data;

/**
 * 
 * @TableName db_iana
 */
@TableName(value ="db_iana")
@Data
public class DbIana implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private String product;

    /**
     * 
     */
    private String ip;

    /**
     * 
     */
    private String country;

    /**
     * 
     */
    private String isp;

    /**
     * 
     */
    private String domaincertification;

    /**
     * 
     */
    private String iana;

    /**
     * 
     */
    private String geolite;

    /**
     * 
     */
    private String iplocation;

    /**
     * 
     */
    private String ippure;

    /**
     * 
     */
    private String targetName;

    /**
     * 
     */
    private String importance;

    /**
     * 
     */
    private String origin;

    /**
     * 
     */
    private String port;

    /**
     * 
     */
    private Integer choose;

    /**
     * 选中理由
     */
    private String chooseReason;

    /**
     * 
     */
    private String targetInfo;

    /**
     * 
     */
    private String targetPng;

    /**
     * 控守状态
     */
    private String controlStatus;

    /**
     * 权限
     */
    private String permission;

    /**
     * 控守时间
     */
    private Date controlTime;

    /**
     * 失控时间
     */
    private Date loseTime;

    /**
     * 
     */
    private String remark;

    /**
     * 2023-11-10 10:10:24  自动补充subdomain
     */
    private String subdomain;

    /**
     * 2023-11-10 10:10:58 自动补充domain
     */
    private String domain;

    /**
     * 脆弱性
     */
    private String fragile;

    /**
     * 其他描述
     */
    private String otherDescribe;

    @TableField(exist = false)
    private Map asn;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DbIana other = (DbIana) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getProduct() == null ? other.getProduct() == null : this.getProduct().equals(other.getProduct()))
            && (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
            && (this.getCountry() == null ? other.getCountry() == null : this.getCountry().equals(other.getCountry()))
            && (this.getIsp() == null ? other.getIsp() == null : this.getIsp().equals(other.getIsp()))
            && (this.getDomaincertification() == null ? other.getDomaincertification() == null : this.getDomaincertification().equals(other.getDomaincertification()))
            && (this.getIana() == null ? other.getIana() == null : this.getIana().equals(other.getIana()))
            && (this.getGeolite() == null ? other.getGeolite() == null : this.getGeolite().equals(other.getGeolite()))
            && (this.getIplocation() == null ? other.getIplocation() == null : this.getIplocation().equals(other.getIplocation()))
            && (this.getIppure() == null ? other.getIppure() == null : this.getIppure().equals(other.getIppure()))
            && (this.getTargetName() == null ? other.getTargetName() == null : this.getTargetName().equals(other.getTargetName()))
            && (this.getImportance() == null ? other.getImportance() == null : this.getImportance().equals(other.getImportance()))
            && (this.getOrigin() == null ? other.getOrigin() == null : this.getOrigin().equals(other.getOrigin()))
            && (this.getPort() == null ? other.getPort() == null : this.getPort().equals(other.getPort()))
            && (this.getChoose() == null ? other.getChoose() == null : this.getChoose().equals(other.getChoose()))
            && (this.getChooseReason() == null ? other.getChooseReason() == null : this.getChooseReason().equals(other.getChooseReason()))
            && (this.getTargetInfo() == null ? other.getTargetInfo() == null : this.getTargetInfo().equals(other.getTargetInfo()))
            && (this.getTargetPng() == null ? other.getTargetPng() == null : this.getTargetPng().equals(other.getTargetPng()))
            && (this.getControlStatus() == null ? other.getControlStatus() == null : this.getControlStatus().equals(other.getControlStatus()))
            && (this.getPermission() == null ? other.getPermission() == null : this.getPermission().equals(other.getPermission()))
            && (this.getControlTime() == null ? other.getControlTime() == null : this.getControlTime().equals(other.getControlTime()))
            && (this.getLoseTime() == null ? other.getLoseTime() == null : this.getLoseTime().equals(other.getLoseTime()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getSubdomain() == null ? other.getSubdomain() == null : this.getSubdomain().equals(other.getSubdomain()))
            && (this.getDomain() == null ? other.getDomain() == null : this.getDomain().equals(other.getDomain()))
            && (this.getFragile() == null ? other.getFragile() == null : this.getFragile().equals(other.getFragile()))
            && (this.getOtherDescribe() == null ? other.getOtherDescribe() == null : this.getOtherDescribe().equals(other.getOtherDescribe()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getProduct() == null) ? 0 : getProduct().hashCode());
        result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
        result = prime * result + ((getCountry() == null) ? 0 : getCountry().hashCode());
        result = prime * result + ((getIsp() == null) ? 0 : getIsp().hashCode());
        result = prime * result + ((getDomaincertification() == null) ? 0 : getDomaincertification().hashCode());
        result = prime * result + ((getIana() == null) ? 0 : getIana().hashCode());
        result = prime * result + ((getGeolite() == null) ? 0 : getGeolite().hashCode());
        result = prime * result + ((getIplocation() == null) ? 0 : getIplocation().hashCode());
        result = prime * result + ((getIppure() == null) ? 0 : getIppure().hashCode());
        result = prime * result + ((getTargetName() == null) ? 0 : getTargetName().hashCode());
        result = prime * result + ((getImportance() == null) ? 0 : getImportance().hashCode());
        result = prime * result + ((getOrigin() == null) ? 0 : getOrigin().hashCode());
        result = prime * result + ((getPort() == null) ? 0 : getPort().hashCode());
        result = prime * result + ((getChoose() == null) ? 0 : getChoose().hashCode());
        result = prime * result + ((getChooseReason() == null) ? 0 : getChooseReason().hashCode());
        result = prime * result + ((getTargetInfo() == null) ? 0 : getTargetInfo().hashCode());
        result = prime * result + ((getTargetPng() == null) ? 0 : getTargetPng().hashCode());
        result = prime * result + ((getControlStatus() == null) ? 0 : getControlStatus().hashCode());
        result = prime * result + ((getPermission() == null) ? 0 : getPermission().hashCode());
        result = prime * result + ((getControlTime() == null) ? 0 : getControlTime().hashCode());
        result = prime * result + ((getLoseTime() == null) ? 0 : getLoseTime().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getSubdomain() == null) ? 0 : getSubdomain().hashCode());
        result = prime * result + ((getDomain() == null) ? 0 : getDomain().hashCode());
        result = prime * result + ((getFragile() == null) ? 0 : getFragile().hashCode());
        result = prime * result + ((getOtherDescribe() == null) ? 0 : getOtherDescribe().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", product=").append(product);
        sb.append(", ip=").append(ip);
        sb.append(", country=").append(country);
        sb.append(", isp=").append(isp);
        sb.append(", domaincertification=").append(domaincertification);
        sb.append(", iana=").append(iana);
        sb.append(", geolite=").append(geolite);
        sb.append(", iplocation=").append(iplocation);
        sb.append(", ippure=").append(ippure);
        sb.append(", targetName=").append(targetName);
        sb.append(", importance=").append(importance);
        sb.append(", origin=").append(origin);
        sb.append(", port=").append(port);
        sb.append(", choose=").append(choose);
        sb.append(", chooseReason=").append(chooseReason);
        sb.append(", targetInfo=").append(targetInfo);
        sb.append(", targetPng=").append(targetPng);
        sb.append(", controlStatus=").append(controlStatus);
        sb.append(", permission=").append(permission);
        sb.append(", controlTime=").append(controlTime);
        sb.append(", loseTime=").append(loseTime);
        sb.append(", remark=").append(remark);
        sb.append(", subdomain=").append(subdomain);
        sb.append(", domain=").append(domain);
        sb.append(", fragile=").append(fragile);
        sb.append(", otherDescribe=").append(otherDescribe);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}